<?php
// this example shows a simple way of conifiguring settings for different environments
require_once dirname(__file__) . '/../blib/blib.php';
// lets start with dev environment...
Blib::env('development');   // this sets it to development...
// some fake DB conf:
Blib::setConf('db', array(
    'host' => 'localhost',
    'user' => 'test',
    'pass' => 'test',
    'dbname' => 'test'
));

Blib::setConf('timeout', 120);

/**
 * then we extend it to test
 * only change the username in db conf
 */
Blib::env('testing');
Blib::extendConf('development');
// the only db change
Blib::setConf('db', array(
    'user' => 'testuser',
));

// now lets see if we get the data right...
echo '<h3>db conf in dev env</h3>';
Blib::env('development');
Blib::dump(Blib::getConf('db'));

echo '<h3>db conf in test env</h3>';
Blib::env('testing');
Blib::dump(Blib::getConf('db'));
?>